import {ref} from 'vue';


export const useToggle = (initValue = false) => {
    const value = ref(initValue);
    const toggle = (val: boolean) => {
        value.value = val === undefined ? !value.value : val;
    };
    return [value, toggle]
};
